package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.dao.SysTaskImagesMapper;
import com.hgkj.cloud.base.domain.SysTaskImages;
import com.hgkj.cloud.base.service.SysTaskImagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SysTaskImagesServiceImpl implements SysTaskImagesService {

    @Autowired
    private SysTaskImagesMapper sysTaskImagesMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return sysTaskImagesMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysTaskImages record) {
        return sysTaskImagesMapper.insert(record);
    }

    @Override
    public int insertSelective(SysTaskImages record) {
        return sysTaskImagesMapper.insertSelective(record);
    }

    @Override
    public SysTaskImages selectByPrimaryKey(Integer id) {
        return sysTaskImagesMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysTaskImages record) {
        return sysTaskImagesMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysTaskImages record) {
        return sysTaskImagesMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<SysTaskImages> listTaskTypes() {
        return sysTaskImagesMapper.listTaskTypes();
    }

    @Override
    public List<SysTaskImages> listTaskSubTypes(String type) {
        return sysTaskImagesMapper.listTaskSubTypes(type);
    }

    @Override
    public List<SysTaskImages> listPageTaskImages(PageInfo pi, Map<String, Object> map) {
        if(pi != null){
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return sysTaskImagesMapper.listPageTaskImages(map);
    }

    @Override
    public long listAllImagesCount(Map<String, Object> map) {
        return sysTaskImagesMapper.listAllImagesCount(map);
    }

    @Override
    public int listPageTaskImagesCount(Map<String, Object> map) {
        return sysTaskImagesMapper.listPageTaskImagesCount(map);
    }

    @Override
    public List<Map<String, Object>> getImages(Map<String, Object> map) {
        return sysTaskImagesMapper.getImages(map);
    }
}
